package com.a.lib_network.http;

import com.hjq.http.listener.OnHttpListener;
import com.a.lib_network.bean.HttpData;

/**
 * CREATE BY 黄炜强
 * 2022-7-19
 * Desc:
 * */
public abstract class MVIHttpCallBack<T> implements OnHttpListener<T> {
    private final HttpData.Result<?> result;

    public MVIHttpCallBack(HttpData.Result<?> result) {
        this.result = result;
    }

    @Override
    public void onFail(Exception e) {
        result.onResult(new HttpData<>(false, e.toString()));
    }


}
